<%flags>
	inherit => '../autohandler_noview'
</%flags>

<%args>
	$title => undef
	$doctext => undef
</%args>

<%init>
	my $error => undef;
	my $updated = $m->comp('../dao/article_dao.mi:update', id => $m->notes('url_id'), fields => { title => $title, doctext => $doctext });
	if(defined $updated) {
		$m->redirect('../show.mc/' . $m->notes('url_id'));
	} else {
		$error = 1;
	}

</%init>

% if (defined $error) {
	<p>an error occured <% $error %></p>
% }